// 1970 Recoding

global keepers1970 ""

numlabel, add

genl id=v70001
global keepers1970 $keepers1970 id

keep if v69006=="1"

genl year=1970
global keepers1970 $keepers1970 year

genl wt=(real(v70019))/100
global keepers1970 $keepers1970 wt

genl v70089_=real(v70089)
genl pid_ce=v70089_
recode pid_ce 2=1 1 3/9=0
global keepers1970 $keepers1970 pid_ce

for any 175 177: replace v70X="" if v70X=="--" 
for any 175 177: genl v70X_=real(v70X)

genl incomehh=v70175_
genl incomer=v70177_

recode incomehh 1=125 2=300 3=400 4=500 5=600 6=700 7=800 8=900 9=1075 10=1325 11=1575 12=1825 13=1950 0 14=.
recode incomer 1=125 2=300 3=400 4=500 5=600 6=700 7=800 8=900 9=1075 10=1325 11=1575 12=1825 13=1950 0 14=.
genl income=incomehh
replace income=incomer if incomehh==. & incomer~=.
replace income=incomehh+incomer if incomer~=. & incomehh~=.
genl income3=income
centile income, c(33 66 100)
replace income3=0 if income<=r(c_1)
centile income, c(33 66 100)
replace income3=1 if income>r(c_1) & income<=r(c_2)
centile income, c(33 66 100)
replace income3=2 if income>r(c_2) & income<=r(c_3)
global keepers1970 $keepers1970 income3

genl vote_ce=real(v70066)
recode vote_ce 2=1 1 3/8=0 0=.
global keepers1970 $keepers1970 vote_ce

genl turnout=real(v70065)
recode turnout 0=. 5=0
global keepers1970 $keepers1970 turnout


// Campaign Interest

replace v70017 = "." in 192
destring v70017, generate(v70017n)

codebook v70017n
gen intcampnew = v70017n
recode intcampnew 1=1 2=.5 3=0 8=. 0=.
label variable intcampnew "campaing interest new"
label define campinterest 1 "1=high interest" 0 "low interest"
label values intcampnew campinterest
tab v70017n intcampnew
global keepers1970 $keepers1970 intcampnew


// General Interest in Pols

replace v70016 = "." in 192
destring v70016, generate(v70016n)

gen talkedaboutnew = v70016n
recode talkedaboutnew 1=1 5=0 2=. 0=.
label variable talkedaboutnew "talked with others new"
label define talked 1 "1=talked to others" 0 "didn't talk"
label values talkedaboutnew talked
tab v70016n talkedaboutnew
global keepers1970 $keepers1970 talkedaboutnew


// Issue Involvement

codebook v74008
gen intissuenew = v74008
recode intissuenew 1=1 2=0 8=.5 0=.
label variable intissuenew "cared about who won new"
label define care 1 "1=cared" 0 "didn't care"
label values intissuenew care
tab v74008 intissuenew
global keepers1970 $keepers1970 intissuenew


// Media Exposure

replace v70007 = "." in 192
destring v70007, generate(v70007n)

codebook v70007n
gen npexpnew = v70007n
recode npexpnew 1=1 5=0 9=. 0=.
label variable npexpnew "reads newspaper new"
label define reads 1 "1=reads np" 0 "doesn't read np"
label values npexpnew reads
tab v70007n npexpnew
global keepers1970 $keepers1970 npexpnew

replace v70006 = "." in 192
destring v70006, generate(v70006n)

codebook v70006n
gen tvfollownew = v70006n
recode tvfollownew 1=1 5=0 0=.
label variable tvfollownew "followed campaign on tv new"
label define follows 1 "1=followed" 0 "didn't follow"
label values tvfollownew follows
tab v70006n tvfollownew
global keepers1970 $keepers1970 tvfollownew

replace v70012 = "." in 192
destring v70012, generate(v70012n)

codebook v70012n
gen npfollownew = v70012n
recode npfollownew 1=1 5=0 0=.
label variable npfollownew "followed campaign in newspaper new"
label values npfollownew follows
tab v70012n npfollownew
global keepers1970 $keepers1970 npfollownew


// Ideology

replace v70028 = "." in 192
destring v70028, generate(v70028n)

codebook v70028n
gen taxspendnew = v70028n
recode taxspendnew 1=1 5=0 9=.5 0=.
label variable taxspendnew "social spending new"
label define spend 1 "1=pro-spending" 
label values taxspendnew spend
tab v70028n taxspendnew
global keepers1970 $keepers1970 taxspendnew

codebook v74045
gen buspowernew = v74045
recode buspowernew 1=1 2=0 8=.5 0=.
label variable buspowernew "business power new"
label define powers 1 "1=too much power"
label values buspowernew powers
tab buspowernew v74045
global keepers1970 $keepers1970 buspowernew

replace v70022 = "." in 192
destring v70022, generate(v70022n)

gen unionpowernew = v70022n
recode unionpowernew 1=1 5=0 9=.5 0=.
label variable unionpowernew "union power new"
label values unionpowernew powers
tab unionpowernew v70022n
global keepers1970 $keepers1970 unionpowernew


// Class/occupation

destring v70172, gen(class_head_grade) ignore("-")
recode class_head_grade 0=. 7=.
label define LblClassGrade 1 "A: (Higher man.; prof." 2 "B: Lower man.; admin." 3 "C1A: Skilled; supervis. non-manu." 4 "C1B: Lower non-manu." 5 "C2: Skilled manu." 6 "D: Unskilled manu."
label values class_head_grade LblClassGrade
global keepers1970 $keepers1970 class_head_grade

destring v70174, gen(class_resp_grade) ignore("-")
recode class_resp_grade 0=. 7=.
label values class_resp_grade LblClassGrade
global keepers1970 $keepers1970 class_resp_grade

destring v70163, gen(male) ignore("-")
recode male 1=1 2=0
global keepers1970 $keepers1970 male

destring v70165, gen(married) ignore("-")
recode married 0=. 1=0 2=1 3=0
global keepers1970 $keepers1970 married

destring v70144, gen(unionmem_resp) ignore("-")
// TH: I cannot track down how the codings work from the relevant codebooks.
// Assuming the scheme operates as it did in other years!
recode unionmem_resp 1=1 5=0 9=0
global keepers1970 $keepers1970 unionmem_resp

destring v70151, gen(unionmem_hous) ignore("-")
// TH: I cannot track down how the codings work from the relevant codebooks.
// Assuming the scheme operates as it did in other years!
recode unionmem_hous 0=0 1=1 5=0 9=0
global keepers1970 $keepers1970 unionmem_hous



// Economic perceptions

destring v70054, gen(econ_ego_retro) ignore("-")
recode econ_ego_retro 1=2 2=0 3=1 9=. 0=.
global keepers1970 $keepers1970 econ_ego_retro
